﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Learning.Classifiers;
using System.IO;
using System.Diagnostics;

namespace Learning
{
    class Program
    {
        static void Main(string[] args)
        {
        string filename;
            Console.WriteLine("Supply with file name and path");
            filename = Console.ReadLine();
            StreamReader reader = new StreamReader(File.OpenRead(filename));

            ID3 id3Object = new ID3();
            ID3 BestModel;
            BestModel = (ID3)id3Object.getBestModel(reader);
            while (true) ;
            while (true) ;
            while (true) ;
            /*
            //ds1
            int
            ans = BestModel.classify(new ushort[] { 1, 0, 0, 2, 0, 0, 2, 3, 1, 3, 1, 1, 1, 0, 0, 5, 4, 3, 7, 5, 6, 2, 5, 4, 2, 1, 8, 1, 4, 7 });//3
            Console.WriteLine(ans);
            ans = BestModel.classify(new ushort[] { 0, 0, 0, 1, 0, 2, 0, 1, 2, 0, 1, 0, 5, 0, 0, 1, 5, 0, 5, 3, 6, 1, 7, 8, 9, 1, 1, 10, 6, 4 });//0
            Console.WriteLine(ans);
            ans = BestModel.classify(new ushort[] { 1, 1, 0, 0, 0, 0, 1, 1, 3, 4, 0, 4, 3, 3, 4, 5, 0, 2, 7, 7, 2, 0, 2, 4, 4, 1, 7, 7, 7, 9 });//2
            Console.WriteLine(ans);
            ans = BestModel.classify(new ushort[] { 1, 1, 1, 2, 1, 2, 2, 1, 3, 1, 2, 2, 3, 2, 0, 5, 4, 0, 2, 6, 6, 0, 1, 0, 8, 8, 9, 7, 7, 2 });//2
            Console.WriteLine(ans);
             */

            /*
             //ds 3
            int 
            ans = BestModel.classify(new ushort[] { 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 3, 1, 1, 1, 3, 5, 0, 4, 5, 0, 1, 5, 2, 2, 0, 7, 8 });//0
            Console.WriteLine(ans);
            ans = BestModel.classify(new ushort[] { 1, 0, 0, 0, 1, 1, 0, 4, 2, 1, 1, 1, 0, 1, 1, 3, 3, 6, 6, 0, 4, 1, 0, 8, 1, 1, 2, 8, 4, 6 });//0
            Console.WriteLine(ans);
            ans = BestModel.classify(new ushort[] { 0, 2, 0, 1, 1, 1, 1, 3, 2, 3, 3, 0, 0, 0, 1, 5, 4, 2, 4, 0, 3, 8, 2, 4, 1, 7, 1, 4, 1, 6 });//1
            Console.WriteLine(ans);
            ans = BestModel.classify(new ushort[] { 0, 1, 0, 2, 1, 1, 3, 5, 0, 2, 6, 4, 0, 0, 1, 1, 1, 0, 2, 1, 1, 6, 2, 1, 9, 1, 1, 2, 0, 0 });//3
            Console.WriteLine(ans);
            */

             Console.Read();
        }
    }
}
